<template>
    <div class="nav_bar">
        <span><van-icon name="arrow-left" color="#fff" v-if="isBack" @click="$router.back()" /></span>
        <section>{{ tittle }}</section>
        <span></span>

    </div>
</template>
<script>
export default {
    props: {
        isBack: {
            type: Boolean,
            default: false
        },
        tittle: {
            type: String,
            default: '我是全局组件'
        }
    }
}
</script>
<style lang="scss" scoped>
.nav_bar {
    height: 50px;
    display: flex;
    align-items: center;
    // justify-content: space-between;
    background-color: #e54847;

    span {
        width: 40px;
        text-align: center;
        border-right: 1px solid #fff;
    }

    section {
        flex: 1;
        // text-align: center;
        color: #fff;
        font-size: 16px;
        margin-left: 10px;
    }


}
</style>